<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<script>


//【示例2】下面示例使用Object.create创建一个与Object对象具有相同的原型对象。该对象具有与使用对象直接量创建的对象相同的原型。Object.getPrototypeOf 函数可获取原始对象的原型。 如果要获取对象的属性描述符，可以使用Object.getOwnPropertyDescriptor 函数。
var firstLine = { x: undefined, y: undefined };
var secondLine = Object.create(Object.prototype, {
    x: {
        value: undefined, 
        writable: true, 
        configurable: true, 
        enumerable: true
    },
    y: {
        value: undefined, 
        writable: true, 
        configurable: true, 
        enumerable: true
    }
});
document.write("first line prototype = " + Object.getPrototypeOf(firstLine));
//first line prototype = [object Object]
document.write("<br/>");
document.write("second line prototype = " + Object.getPrototypeOf(secondLine));
//second line prototype = [object Object]


</script>
</head>

<body>
</body>
</html>
